import type {
  Comment,
  CommentSubmitDTO,
  CommnetPageDTO,
  PageResult,
} from "@/types/comment";
import { httpR2 } from "@/utils/http";
/**
 * 提交评论
 * @param query
 * @returns
 */
export const submitCommentApi = (query: CommentSubmitDTO) => {
  return httpR2<Comment>({
    method: "POST",
    url: "/content/comment/submit",
    data: {
      ...query,
    },
  });
};

/**
 * 提交评论
 * @param query
 * @returns
 */
export const getCommentPageApi = (query: CommnetPageDTO) => {
  return httpR2<PageResult>({
    method: "POST",
    url: "/content/comment/page",
    data: {
      ...query,
    },
  });
};
